Skip to content

Conversation

@christianfosli
Copy link
Contributor

@christianfosli christianfosli commented Dec 18, 2020

Description

The base64.encodestring() method has been deprecated since Python 3.1 and removed in Python 3.9
This fixes crash for azure keyvault certificate download, as described in #16318

Testing Guide

Please verify that az keyvault certificate download works as intended.

History Notes

[Keyvault] az keyvault certificate download: Fix deprecated/removed method call


This checklist is used to make sure that common guidelines for a pull request are followed.

@ghost ghost added the customer-reported Issues that are reported by GitHub users external to the Azure organization. label Dec 18, 2020
@ghost
Copy link

ghost commented Dec 18, 2020

Thank you for your contribution christianfosli! We will review the pull request and get back to you soon.

@christianfosli christianfosli changed the title [Keyvault] Fix #16318: az keyvault certificate download crashes on Python 3.9 due to deprecated/removed method call [Keyvault] Fix #16318: az keyvault certificate download crash on Python 3.9 due to removed method call Dec 18, 2020
@yonzhan
Copy link
Collaborator

yonzhan commented Dec 19, 2020

Keyvault

@yungezz yungezz added the KeyVault az keyvault label Dec 21, 2020
@yungezz
Copy link
Member

yungezz commented Dec 21, 2020

hi @houk-ms could you pls have a review? thanks

…ate download

`base64.encodestring()` has been a deprecated alias for
`base64.encodebytes()` since Python 3.1, and have has now been removed
in Python 3.9.

This replaces the removed/deprecated method with the one it was
aliased to.

Fixes #16318
@christianfosli
Copy link
Contributor Author

Force-push: rebase on dev

Copy link
Contributor

@houk-ms houk-ms left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks @christianfosli for the fix!

@houk-ms houk-ms merged commit 80216cc into Azure:dev Jan 25, 2021
@christianfosli christianfosli deleted the keyvault-python39-iss16318 branch January 25, 2021 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

customer-reported Issues that are reported by GitHub users external to the Azure organization. KeyVault az keyvault

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants